﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:model="clr-namespace:MSDNWebcast.ViewModels">
    <DataTemplate x:Key="courseDataTemplate">
        <Grid Margin="10,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition></RowDefinition>
                <RowDefinition></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            
            <TextBlock Width="100" Margin="0,5,0,0" DockPanel.Dock="Left" FontSize="13" Text="{Binding Path = Date}"
                VerticalAlignment="Top" Foreground="#8a959e" FontFamily="微软雅黑" LineHeight="22" />
            
            <StackPanel Grid.Column="1"  Margin="5,0" HorizontalAlignment="Stretch">
                <TextBlock Margin="8,0,0,2" Text="{Binding Path = Headline}" FontSize="18" FontStretch="UltraExpanded"
                    VerticalAlignment="Bottom" Foreground="White" FontFamily="微软雅黑" TextWrapping="Wrap" LineHeight="28" >
                    <Image Margin="6,0,0,0" Source="..\Images\speaker.png" Height="12" Width="12" VerticalAlignment="Top"  ToolTip="{Binding Path = Speaker}" />
                    <!--<Image Source="Images\archive_on.png" Height="12" Width="12" VerticalAlignment="Top" 
                           ToolTip="{Binding Path = Date}" />-->
                </TextBlock>
                <TextBlock Margin="8,0,0,12" FontSize="13" FontStretch="UltraExpanded"
                    VerticalAlignment="Bottom" Foreground="#8a959e" FontFamily="微软雅黑" TextWrapping="Wrap" LineHeight="22" Text="{Binding Path = Series}">
                </TextBlock>
            </StackPanel>
            
            <StackPanel Grid.Row="1" Grid.Column="1"  Name="detialPanel" Margin="5,0" HorizontalAlignment="Stretch" Visibility="Collapsed" >
                <Rectangle DockPanel.Dock="Left" Width="100"/>
                <!--<TextBlock DockPanel.Dock="Top" Margin="8,0" Language="zh-cn" FontSize="13"  Grid.Row="1" LineHeight="22" FontStretch="UltraExpanded"
                                                                           TextAlignment="Justify" Text="课程简介："
                                                                        VerticalAlignment="Bottom" FontStyle="Normal" Foreground="#d2d8de"/>-->
                <TextBlock  DockPanel.Dock="Top" Margin="8,0" Language="zh-cn" FontSize="13"  Grid.Row="1" LineHeight="22" FontStretch="UltraExpanded"
                         VerticalAlignment="Bottom" FontStyle="Normal" Foreground="#8a959e" TextWrapping="Wrap"  Text="{Binding Path = Description}">
                    <Run Text=" "/>
                    <Hyperlink Foreground="#d2d8de" NavigateUri="{Binding Path = Url}" >详细
                        <Image Source="..\Images\external_link.png" Height="12" Width="12" Opacity=".75" VerticalAlignment="Top"  />
                    </Hyperlink>
                    </TextBlock>
                <TextBlock Margin="0,12" DockPanel.Dock="Top" VerticalAlignment="Bottom" FontFamily="微软雅黑"  FontSize="13"
                       Foreground="#8a959e" LineHeight="20" Text="下载：ppt | mp3 | mp4 | wma"/>
            </StackPanel>
            
            <Rectangle Grid.ColumnSpan="2" Margin="0,10,0,10" Grid.Row="2" Height="2" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" SnapsToDevicePixels="True">
                <Rectangle.Fill>
                    <ImageBrush ImageSource="..\Images\sep_horizontal.png" TileMode="Tile"/>
                </Rectangle.Fill>
            </Rectangle>
        </Grid>

    </DataTemplate>
</ResourceDictionary>